/**
 * Answer.java
 * com.zhihu.zhihuquan.model
 * Copyright (c) 2016, 北京聚智未来科技有限公司版权所有.
 */

package com.zhihu.zhihuquan.model;

import java.util.Date;

import com.eova.common.base.BaseModel;
import com.eova.common.constant.ConstantValue;
import com.eova.common.id.Sequence;

/**
 * 首页，知乎圈
 * 
 * @author wxl
 * @Date 2016年12月23日
 */
public class Problem extends BaseModel<Problem> {

	/**
	 * TODO（用一句话描述这个变量表示什么）
	 */

	private static final long serialVersionUID = 2130370312784262532L;

	public static final Problem dao = new Problem();

	/**
	 * 
	 * 描述:添加问题 作者:gyp
	 */
	public boolean addProblem(Problem problem, String title, String classType,
			String content) {

		problem.set("id", Sequence.nextId());
		problem.set("title", title);
		problem.set("content", content);
		problem.set("ord", ConstantValue.EOVA_ZERO);
		problem.set("classType", classType);
		problem.set("createDate", new Date());
		problem.set("createUser", "从session中获取");
		problem.set("isDelete", ConstantValue.EOVA_DELETE_NO);
		problem.set("isRecommend", ConstantValue.EOVA_NO);

		return problem.save();
	}

}
